Conversation
- Replace inline rendering of user status with a new LoginDataCard component for better code organization and reusability. - Update UserStatusContent to utilize the new LoginDataCard, enhancing the display of login method and wallet information. - Simplify the MenuList component by removing redundant dynamic import of UserStatusMenu. - Improve handling of passkey display ID for a more consistent user experience.
- Adjust padding in the Leaflet component of the Modal to improve layout. - Update padding in the SwapForm and related components to enhance visual consistency. - Modify padding in the Footer and Widget components for better alignment and spacing.
- Add space between form elements in the SwapForm component to improve visual organization. - Ensure pointer events are managed correctly during form submission for better user interaction.
- Delete the LoginModal component, which handled user login via passkeys and wallets, to streamline the authentication process. - Remove the PasskeyChoice component, responsible for selecting between existing and new passkeys, as part of the refactor.
Update Modals in TRAIN, resolves FRONT-878
…Modal error handling - Add optional props `showHeader` and `showPasskeyWarning` to UserStatusContent for improved customization. - Refactor UserStatusDrawer to utilize UserStatusContent, disabling header and passkey warning for a cleaner mobile view. - Introduce a utility function in LoginModal for consistent error message handling during login failures.
Implement passkey/wallet login
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Add `pr-review-report.md` and `tsconfig.tsbuildinfo` to .gitignore for better file management. - Extend `CommitmentParams`, `RefundParams`, and `ClaimParams` in the PHTLC model to include an optional `index` property for hashlock-based contracts. - Introduce a new `LockStatus` enum to represent the status of locks in the PHTLC model. - Update various components and hooks to utilize the new `LockStatus` and modified PHTLC types for improved functionality and clarity.
Small fix in header height for stable layout in app and menu
…ork model and related components for improved network handling - Updated `package.json` to include `@number-flow/react` as a new dependency and modified script commands to specify port 6969. - Updated `yarn.lock` to reflect the addition of `@number-flow/react` and its dependencies. - Refactored `Network` model to enhance type definitions and added new types for better structure. - Updated various components to utilize the new `slug` property for network identification instead of `name`, improving consistency across the application. - Adjusted transaction explorer links and other references to align with the new network structure.
Implement new contract interactions
- Removed the FeeProvider context and associated logic from the application. - Updated components to directly use the new `useQuoteData` hook for fetching fee quotes. - Adjusted the `SwapForm`, `FeeDetailsComponent`, and related components to accommodate the new fee handling approach. - Enhanced the `DetailedEstimates` component to accept quote data directly, improving data flow and reducing unnecessary context dependencies. - Cleaned up imports and ensured all components are aligned with the new structure.
…s FRONT-876 FRONT-879
…ion merging Replace loose Record<string, unknown> configs with generic functions and open HTLCClientConfigMap/WalletSignConfigMap interfaces. Each chain SDK augments the maps via declare module, eliminating all `as` casts in factory registrations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… and guard native SOL by address
- useHTLCWriteClient: call adapter.sendTransaction() directly instead of
solanaSendTransaction() from context, fixing WalletNotConnectedError
when adapter is connected but WalletProvider context state is null
- Add NATIVE_SOL_ADDRESS constant ('11111111...') to types.ts
- Replace truthy contractAddress checks with explicit !== NATIVE_SOL_ADDRESS
guard in transactionBuilder, refund(), and redeemSolver()
- Fix solanaGasProvider: srcLpAddress field name, hashlock as hex string,
sourceAsset with decimals, as-any cast for dummy estimation params
…uilders - Replace contractAddress truthiness checks with explicit NATIVE_SOL_ADDRESS comparison in transactionBuilder and client (handles null from API correctly) - Add NATIVE_SOL_ADDRESS constant to constants.ts; replace all hardcoded system address strings in client.ts with it - Extract refundTransactionBuilder and redeemSolverTransactionBuilder from client.ts into transactionBuilder.ts; client now only handles sign/send/confirm - Remove useSolanaWalletStore: signMessage is now read from the live adapter directly in walletLoginContext (same pattern as sendTransaction) - Fix WalletNotConnectedError in useHTLCWriteClient: call adapter.sendTransaction directly instead of solanaSendTransaction from WalletProvider context - Fix gas estimation: correct lpAddress → srcLpAddress, hashlock type, contractAddress null-safety, and replace as any with proper dummy params - Rename phtlcTransactionBuilder export to userLockTransactionBuilder
- Updated the userLock method to destructure parameters directly from the input object, enhancing readability and maintainability. - Adjusted the handling of various parameters such as sourceAddress, atomicContract, and rewardToken to ensure consistency. - Improved error handling and logging for better debugging during transaction execution. These changes streamline the userLock implementation, making it more intuitive and easier to manage.
- Simplified the destructuring of parameters in the userLock method by directly accessing hashlock from params. - Enhanced the return statement to ensure consistency in the returned object structure. These changes improve code clarity and maintainability in the EvmHTLCClient implementation.
- Removed the quoteExpiry parameter from the userLock method call, simplifying the parameter list. - Updated the return statement to include the nonce from params, ensuring a more comprehensive response. These changes improve the clarity and consistency of the SolanaHTLCClient implementation.
- Updated the signMessage function to directly call signMessage on the connected adapter, improving clarity and reducing unnecessary type casting. - Removed console log for starknetAccount to clean up the code and maintain focus on essential logic. These changes enhance the readability and maintainability of the wallet login context implementation.
…ferences - Added new dependencies: vitest and rimraf to pnpm-workspace.yaml. - Updated package.json files across multiple packages to reference dependencies from the catalog instead of specific versions for @coral-xyz/anchor, @solana/spl-token, and @solana/web3.js. - Ensured consistency in devDependencies by changing rimraf and vitest to catalog references in aztec, evm, solana, and starknet packages. These changes streamline dependency management and improve version control across the workspace.
Solana initial implementation, resolves FRONT-896
- Removed the waitForReceipt utility function from utils.ts and integrated it as a private method within the EvmHTLCClient class. - This change enhances encapsulation and improves the organization of transaction receipt handling within the client implementation.
- Changed the lint command to use `pnpm --filter train-app lint` for clarity. - Added a new section for `packages/blockchains/` detailing chain-specific HTLC client implementations. - Updated the description of `apps/app/lib/trainApiClient.ts` to clarify its role as a wrapper for `@train-protocol/sdk`. - Revised key files section to reflect the new structure of chain-specific implementations and wallet/atomic interfaces.
- Removed unnecessary type imports and streamlined the registration of the Solana HTLC client by passing the config object directly. - Updated the wallet signing configuration to use a more straightforward type definition. - Adjusted tests to reflect changes in wallet handling, ensuring error messages are correctly validated. These changes enhance code clarity and maintainability in the Solana implementation.
Enforce type safety in HTLC and wallet sign registries
…is redeemed - Updated the refreshInterval logic to conditionally stop polling based on the lock status. - Integrated LockStatus from the SDK to improve type safety and clarity in the polling mechanism.
hydration sync so that clearing activeHashlock on swap completion is not overridden by a stale Next.js query param.
Fix: prevent stale hashlock from reopening finished swap modal
- Changed nativeTokenAddress and contractAddress to use a specific address for Solana Devnet. - Updated the KnownInternalNames class to reflect the new identifier for Solana Devnet, enhancing clarity and consistency in the codebase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.